<?php
class Message extends AppModel {
	var $name = 'Message';

	var $belongsTo = array(
		'From' =>
			array('className' => 'User',
				'foreignKey' => 'from_id'
			),
		'To' =>
			array('className' => 'User',
				'foreignKey' => 'to_id'
			),
		/*'Parentreply' =>
			array('className' => 'Message',
				'foreignKey'=> 'replied_id'
			)*/
		
	);

	var $hasMany = array(
		'Replied' =>
			array('className' => 'Message',
				'foreignKey'=> 'replied_id'
			)
	);
}